package com.example.gyt.service;

import com.example.gyt.dao.CommodityMapper;
import com.example.gyt.dao.UserMapper;
import com.example.gyt.pojo.Commodity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommodityService {

    @Autowired
    private CommodityMapper commodityMapper;

    public int deleteByPrimaryKey(String id){
        return commodityMapper.deleteByPrimaryKey(id);
    }

    public int insertSelective(Commodity record){
        return commodityMapper.insertSelective(record);
    }

    public Commodity selectByPrimaryKey(String id){
        return commodityMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Commodity record){
        return commodityMapper.updateByPrimaryKeySelective(record);
    }

    public List<Commodity> getAllCommodityList(Commodity record){
        return commodityMapper.getAllCommodityList(record);
    }

    public int queryCountLike(Commodity record){
        return commodityMapper.queryCountLike(record);
    }

}
